﻿using System;

namespace pos12.Models
{
    public class PosyvnikyAdminModel 
    {
        //п.1
        private int _freeDays;
        private int _maxDays;
        private DateTime _dateFrom;
        private DateTime _dateTo;
        private float _minPriceWithDiscount;
        private float _minPriceWithoutDiscount;
        private float _oneDayPlacementPrice;
        private int _maxDiscountTerm;
        
        //п.2
        private float _oneLiftPrice;
        private int _maxLifts;
        private int _maxDiscountTopper;
        private float _minPriceForRaise;
        private float _maxPriceForRaise;
        private float _minPriceForRaiseWithoutDiscount;

        private int _liftsCountPerDays;    // For select 
        private int _liftsCountDays;            // lifts frequncy

        //p.3
        private int _minRewardAgent;
        private int _maxRewardAgent;

        private CurrencyEnum _currency;

        public CurrencyEnum Currency
        {
            get { return _currency; }
            set { _currency = value; }
        }

        public int MinLifts { get; set; }

        public int LiftsCountPerDays 
        {
            get { return _liftsCountPerDays; }
            set { _liftsCountPerDays = value; }
        }

        public int LiftsCountDays
        {
            get { return _liftsCountDays; }
            set { _liftsCountDays = value; }
        }

        public int MaxDays
        {
            get { return _maxDays; }
            set { _maxDays = value; }
        }

        public int FreeDays
        {
            get { return _freeDays; }
            set
            {
                if (value >= 0)
                {
                    _freeDays = value;
                }
            }
        }

        public DateTime DateFrom
        {
            get { return _dateFrom; }
            set { _dateFrom = value; }
        }

        public DateTime DateTo
        {
            get { return _dateTo; }
            set { _dateTo = value; }
        }

        public float MinPriceWithDiscount
        {
            get { return _minPriceWithDiscount; }
            set { _minPriceWithDiscount = value; }
        }

        public float MinPriceWithoutDiscount
        {
            get { return _minPriceWithoutDiscount; }
            set { _minPriceWithoutDiscount = value; }
        }

        public float OneDayPlacementPrice
        {
            get { return _oneDayPlacementPrice; }
            set { _oneDayPlacementPrice = value; }
        }

        public int MaxDiscountTerm
        {
            get { return _maxDiscountTerm; }
            set
            {
                if (value >= 0 && value <= 90)
                {
                    _maxDiscountTerm = value;
                }
            }
        }

        public int MaxDiscountTopper
        {
            get { return _maxDiscountTopper; }
            set
            {
                if (value >= 0 && value <= 90)
                {
                    _maxDiscountTopper = value;
                }
            }
        }

        public int MaxLifts
        {
            get { return _maxLifts; }
            set
            {
                if (value >= 0)
                {
                    _maxLifts = value;
                }
            }
        }

        public float OneLiftPrice
        {
            get { return _oneLiftPrice; }
            set
            {
                if (value >= 0)
                {
                    _oneLiftPrice = value;
                }
            }
        }

        public float MinPriceForRaise
        {
            get { return _minPriceForRaise; }
            set {
                if (value >=0)
                {
                    _minPriceForRaise = value;
                }
            }
        }

        public float MaxPriceForRaise
        {
            get { return _maxPriceForRaise; }
            set
            {
                if (value >= 0)
                {
                    _maxPriceForRaise = value;
                }
            }
        }

        public float MinPriceForRaiseWithoutDiscount
        {
            get { return _minPriceForRaiseWithoutDiscount; }
            set
            {
                if (value >= 0)
                {
                    _minPriceForRaiseWithoutDiscount = value;
                }
            }
        }
        public int MinRewardAgent
        {
            get { return _minRewardAgent; }
            set
            {
                if (value >= 0)
                {
                    _minRewardAgent = value;
                }
            }
        }
        public int MaxRewardAgent
        {
            get { return _maxRewardAgent; }
            set
            {
                if (value >= 0)
                {
                    _maxRewardAgent = value;
                }
            }
        }

        public string dateFormate {
            get { return "dd.MM.yyyy"; }
        }
    }
}